package Object;

public class object {
    public static void main(String[] args) {
        Clone();
    }

    //对象转成String
    public static void ToString() {
        String s = "sb is me";
        StringBuilder sb = new StringBuilder("sb is me");
        System.out.println(s.toString());
        System.out.println(sb.toString());
    }

    //    equal
    public static void Equal() {
        String s = "sb is me";
        String s1 = "sb is me";
        StringBuilder sb = new StringBuilder("sb is me");
        System.out.println(s.equals(s1));
    }

    //    clone
    public static void Clone() {
        int[] s1 = {1, 2, 3};
        int[] s2 = s1.clone();
        System.out.println(s1);
        System.out.println(s2);
        System.out.println(s2.equals(s1));
    }
}
